home *** CD-ROM | disk | FTP | other *** search
/ PC Answers 1998 January / PC Answers Issue 49 Cover CD January 1998.iso / Apps / Director / DATA.Z / Streaming Shockwave.dir / Standard Elements_4_Button Handler.ls < prev    next >
Encoding:
Text File  |  1997-05-10  |  1.0 KB  |  38 lines

  1. on doButton whereTo, frameOffset, whichTransition, howLong
  2.   global gStreamingShockwaveButtonPropertyList
  3.   if ilk(whereTo) = #propList then
  4.     set localPropertyList to whereTo
  5.   else
  6.     set localPropertyList to gStreamingShockwaveButtonPropertyList
  7.   end if
  8.   set the member of sprite the clickOn to getaProp(localPropertyList, the clickOn) + 1
  9.   updateStage()
  10.   set the member of sprite the clickOn to getaProp(localPropertyList, the clickOn)
  11.   updateStage()
  12.   puppetSprite(the clickOn, 0)
  13.   if voidp(whereTo) or (ilk(whereTo) = #propList) then
  14.     return 1
  15.   else
  16.     puppetTransition(0)
  17.     removeButtons()
  18.     if not voidp(whichTransition) then
  19.       puppetTransition(whichTransition, howLong)
  20.     end if
  21.     if stringp(whereTo) then
  22.       if the labelList contains whereTo & RETURN then
  23.         go(whereTo)
  24.       end if
  25.     else
  26.       if integerp(whereTo) then
  27.         if voidp(frameOffset) then
  28.           go(marker(whereTo))
  29.         else
  30.           go(marker(whereTo) + frameOffset)
  31.         end if
  32.       end if
  33.     end if
  34.     FindButtons()
  35.   end if
  36.   return 1
  37. end
  38.